<template>
  <ButtonGroup
    :title="configKey === 'titleItalic' ? '标题倾斜' : '描述倾斜'"
    :status="status[currentStatus]"
  >
    <el-button-group>
      <el-button
        :class="{
          select: currentStatus === 0,
        }"
        @click="italicHandle(0)"
      >
        <font-awesome-icon icon="italic" size="lg" />
      </el-button>
      <el-button
        :class="{
          select: currentStatus === 1,
        }"
        @click="italicHandle(1)"
      >
        <font-awesome-icon icon="italic" size="sm" />
      </el-button>
    </el-button-group>
  </ButtonGroup>
</template>

<script setup lang="ts">
import ButtonGroup from './ButtonGroup.vue'
import { inject } from 'vue'
const props = defineProps<{
  currentStatus: number
  status: string[]
  isShow: boolean
  editCom: VueComType
  configKey: string
}>()
const updateStatus = inject('updateStatus')
const italicHandle = (index: number) => {
  updateStatus(props.configKey, index)
}
</script>

<style scoped></style>
